import { defineStore } from "pinia"
import { ref } from "vue"
import type { Discount } from "@/types/discount"

export const useDiscountStore = defineStore("discount", () => {
    const discountInfo = ref<Discount[]>([
        {
            region: "北京海淀",
            discounts: [
                {
                    title: "北京考研直达票",
                    cover:
                        "https://bpic.588ku.com/Templet_origin_pic/05/30/78/2bb2a599fccb89918944384175cf0321.jpg",
                    evaluate: 4273,
                    rating: 4.7,
                    participants: "200k",
                    city: "北京",
                    price: 165,
                    discounts: ["价格保证", "年终大促"],
                    tags: ["热卖", "轻松退款"],
                }
            ]
        },
        {
            region: "福建厦门",
            discounts: [
                {
                    title: "厦门高考直达票",
                    cover:
                        "https://img.zcool.cn/community/01423b59636ddaa8012193a372a0c8.jpg@2o.jpg",
                    evaluate: 7935,
                    rating: 4.5,
                    participants: "400k",
                    city: "厦门",
                    price: 295,
                    discounts: ["年终大促", "40% off"],
                    tags: ["热卖", "立即确认"],
                }
            ]
        },
        {
            region: "江西南昌",
            discounts: [
                {
                    title: "南昌强国推荐票",
                    cover:
                        "https://ts1.cn.mm.bing.net/th/id/R-C.82de9ea7201fcb5eebeae75d4ecb58bb?rik=tT2E8Af22sItwA&riu=http%3a%2f%2fwww.hinews.cn%2fnews%2fpic%2f003%2f206%2f002%2f00320600236_b9d0f04f.jpg&ehk=ivyh0I7PowGgn9dHwUB4qenUGEDFm%2bXFkE5fXo%2b41n4%3d&risl=&pid=ImgRaw&r=0",
                    evaluate: 67248,
                    rating: 4.7,
                    participants: "1M",
                    city: "南昌",
                    price: 180,
                    discounts: ["南昌热卖"],
                    tags: ["热卖", "立即确认"],
                }
            ]
        },
        {
            region: "浙江温州",
            discounts: [
                {
                    title: "温州高考英语直达票",
                    cover:
                        "https://bpic.588ku.com/Templet_origin_pic/05/37/10/9929392a985637c9e1d9199693dda9a9.jpg",
                    evaluate: 230,
                    rating: 4.4,
                    participants: "9k",
                    city: "温州",
                    price: 131,
                    discounts: ["年终大促"],
                    tags: ["轻松退款", "立即确认"],
                }
            ]
        },
        {
            region: "湖北武汉",
            discounts: [
                {
                    title: "武汉职场技能直达票",
                    cover:
                        "https://bpic.588ku.com/templet_pic/21/06/08/b1f980b852add5eb43303a303b5329b7.jpg!/fw/750/quality/90/unsharp/true/compress/true",
                    evaluate: 6298,
                    rating: 4.8,
                    participants: "200k",
                    city: "武汉",
                    price: 438,
                    discounts: ["年终大促"],
                    tags: ["热卖", "轻松退款"],
                }
            ]
        },
        {
            region: "广西南宁",
            discounts: [
                {
                    title: "南宁前端开发直达票",
                    cover:
                        "https://10.idqqimg.com/qqcourse_logo_ng/ajNVdqHZLLAOHpUv0Ot3ymSzy5MXsyyZFVqU7fxv7s03DOzXVRfGCr9lMJ8viaLE2eQcCtbrweaw/",
                    evaluate: 4404,
                    rating: 4.9,
                    participants: "100k",
                    city: "南宁",
                    price: 772,
                    discounts: ["年终大促"],
                    tags: ["热卖", "立即确认"],
                }
            ]
        },
    ])

    return {
        discountInfo,
    }
})


